#include <stdio.h>
#include <stdlib.h>


int main()
{
    //会将每个元素初始化为0
    int *p = (int*)calloc(3,sizeof(int));
    if(p == NULL)
    {
        printf("calloc error!\n");
        return -1;
    }
    for(int i = 0; i < 3; i++)
    {
        printf("%d ",p[i]);
    }
    printf("\n");
    free(p);
    return 0;
}